{extend name="admin@public/base_content" /}
<!--头部描述信息开始<div class="container-fluid am-cf">-->
{block name="content_header">}{include file="admin@public/common" /}{/block}
<!--头部描述信息结束-->
<!-- 内容区域开始 <div class="row-content am-cf">-->
{block name="body">}
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-body am-fr">
                    <form class="m-form tpl-form-border-form tpl-form-border-br" role="form" action="{:url('')}" method="post" id="ajax_form"  >
                        <div class="page-header-heading">操作权限 (勾选模块后后面的权限才会生效，不选择任何权限为拥有所有权限)</div>
                        <hr/>
                        {foreach name='AdminPurvew' item='vo' key='key'}
                            {foreach name='vo' item='v1' key='k1'}
                            <div class="am-form-group">
                                <label class="am-u-sm-2 am-form-label" > {$v1.name} </label>
                                <div class="am-u-sm-10">
                                    <div class="am-btn-group" data-am-button="">
                                        {if condition="in_array($key.'_'.$k1,(array)$AdminPurvewArray)"}
                                        <label class="am-btn am-btn-primary am-active"><input value="{$key}_{$k1}" name="base_purview[]" checked type="checkbox"> 模块</label>
                                        {else}
                                        <label class="am-btn am-btn-primary"><input value="{$key}_{$k1}" name="base_purview[]" type="checkbox"> 模块</label>
                                        {/if}
                                        {foreach name='v1.auth' item='v2' key='k2'}
                                            {if condition="in_array($key.'_'.$k1.'_'.$k2,$AdminPurvewArray)"}
                                            <label class="am-btn am-btn-primary am-active">
                                                <input value="{$key}_{$k1}_{$k2}" name="base_purview[]" checked type="checkbox"> {$v2}
                                            </label>
                                            {else}
                                            <label class="am-btn am-btn-primary">
                                                <input value="{$key}_{$k1}_{$k2}" name="base_purview[]" type="checkbox"> {$v2}
                                            </label>
                                            {/if}
                                        {/foreach}
                                    </div>
                                </div>
                            </div>
                            {/foreach}
                        {/foreach}

                        <div class="page-header-heading">菜单权限 (勾选模块后后面的权限才会生效，不选择任何权限为拥有所有权限)</div>
                        <hr/>
                        {foreach name='AdminMenu' item='vo' key='key'}
                        <div class="am-form-group">
                            <label class="am-u-sm-2 am-form-label" > {$vo.name|default=''} </label>
                            <div class="am-u-sm-10">
                                <div class="am-btn-group" data-am-button="">
                                    {foreach name='vo.menu' item='v1' key='k1'}
                                    {if condition="in_array($vo['name'].'_'.$v1['name'],(array)$AdminMenuArray)"}
                                        <label class="am-btn am-btn-primary am-active">
                                            <input value="{$vo.name}_{$v1.name}" checked name="menu_purview[]" type="checkbox"> {$v1.name}
                                        </label>
                                    {else}
                                        <label class="am-btn am-btn-primary">
                                            <input value="{$vo.name}_{$v1.name}" name="menu_purview[]" type="checkbox"> {$v1.name}
                                        </label>
                                    {/if}
                                    {/foreach}
                                </div>
                            </div>
                        </div>
                        {/foreach}

                        <div class="am-form-group">
                            <div class="am-u-sm-9 am-u-sm-push-3">
                                <input type="hidden" name="group_id" type="hidden" value="{$info.group_id}">
                                <button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success" id="btn">保存</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
<!-- 内容区域结束 -->